<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>12表单输入绑定</title>
    <style>
        .redBorder{
            border-color: red;
            border-width: 1px;
            border-style: solid;
        }
    </style>
</head>
<body>
<div id="app">
    计算器：{{ counter }}<br>
    <!--输入框利用v-model实现双向绑定-->
    <input type="text" v-model="message" placeholder="请输入内容">
    <div>{{ message }}</div>
    <!--复选框利用v-model实现双向绑定-->
    <input type="checkbox" id="c1" value="Mr.Lee" v-model="checkedNames"><label for="c1">Mr.Lee</label>
    <input type="checkbox" id="c2" value="Mr.Guo" v-model="checkedNames"><label for="c2">Mr.Guo</label>
    <input type="checkbox" id="c3" value="Mr.Chu" v-model="checkedNames"><label for="c3">Mr.Chu</label>
    <div>{{ checkedNames }}</div>
    <!--单选框利用v-model实现双向绑定-->
    <input type="radio" id="r1" value="nan" v-model="gender" ><label for="r1">男</label>
    <input type="radio" id="r2" value="nv" v-model="gender" ><label for="r2">女</label>
    <div>{{gender}}</div>
    <!--下拉框利用v-model实现双向绑定-->
    <select v-model="selected">
        <option value="beijing">北京</option>
        <option value="shanghai">上海</option>
        <option value="guangzhou">广州</option>
    </select>
    <div>{{ selected }}</div>
</div>
<script src="../vue.global.3.0.5.js"></script>
<script>
    //声明一个选项对象
    const App={
        //初始数据
        data() {
            return {
                counter: 100,
                message: "Vue3.x",
                checkedNames: [],
                gender: "",
                selected: ""
            }
        },
        methods: {
            
        },
        computed: {
            compClassName: {
                get() {
                    
                },
                set(value) {

                }
            }
        }
    }

    //全局API对象，创建应用对象返回(选项对象).挂载方法(DOM节点)
    const vm = Vue.createApp(App).mount("#app");
</script>
</body>
</html>